//
//  RMNoteCell.m
//  RMNote
//
//  Created by lxf on 16/4/18.
//  Copyright © 2016年 lxf. All rights reserved.
//

#import "RMNoteCell.h"

@implementation RMNoteCell

- (void)setModel:(RMBaseModel *)model{
    _model = model;
    self.titleLabel.text = model.title;
    NSString *imgPath = [[NSBundle mainBundle]pathForResource:[NSString stringWithFormat:@"%@.png",model.createDate.day] ofType:nil];
    self.dayImageView.image = [UIImage imageWithContentsOfFile:imgPath];
//    NSMutableAttributedString *atstr = [[NSMutableAttributedString alloc]initWithString:self.model.content];
//    NSRange rang;
//    rang.location = 0;
//    rang.length = atstr.length;
//    [atstr enumerateAttribute:@"NSAttachment" inRange:rang options:NSAttributedStringEnumerationReverse usingBlock:^(id  _Nullable value, NSRange range, BOOL * _Nonnull stop) {
//        if ([value isKindOfClass:[NSTextAttachment class]]) {
//            [atstr deleteCharactersInRange:range];
//        }
//        
//    }];

    
    self.contentLabel.text = model.content;
//    self.contentLabel.attributedText = atstr;
}


- (void)awakeFromNib {
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
